<template>
  <div class="hello">
    <Header> </Header>
    <Footer> </Footer>

  </div>
</template>

<script>


export default {
  name: '',
  components : {

  },
  data () {
    return {
      new_password: '',
    }

  },
  methods: {
      onSubmit() {
          //this.$message.success(this.username);
          var that = this ;
          var url = DocConfig.server+'/api/user/resetPasswordByUrl';

          var params = new URLSearchParams();
          params.append('new_password', this.new_password);
          params.append('uid', this.$route.query.uid);
          params.append('email', this.$route.query.email);
          params.append('token', this.$route.query.token);

          that.axios.post(url, params)
            .then(function (response) {
              if (response.data.error_code === 0 ) {
                let redirect = decodeURIComponent(that.$route.query.redirect || '/item/index');
                that.$router.replace({
                  path: redirect
                });
              }else{
                that.$alert(response.data.error_message);
              }

            });
      }
  },
  mounted() {
  },
  beforeDestroy(){
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

.center-card a {
  font-size: 12px;
}

.center-card{
  text-align: center;
}

.v_code_img{
  margin-top: 20px;
}
</style>
